import request from '@/utils/request';
// request.defaults.baseURL = 'https://www.fastmock.site/mock/a0d50905cfcec67015765c9976c7e381/scrm-api';

/**
 * 数据-推广活动-推广活动明细-按员工
 * @param data
 * @returns
 */
export const getStaticsPromotionAccountDetail = (data: any) => {
    return request({
        url: '/scrm-api/console/retail/shop/statics-promotion-account-detail',
        method: 'POST',
        data,
        timeout: 60000,
        noNeedLoading: true
    });
};

/**
 * 数据-推广活动-推广活动明细-按商品
 * @param data
 * @returns
 */
export const getStaticsPromotionProductDetail = (data: any) => {
    return request({
        url: '/scrm-api/console/retail/shop/statics-promotion-product-detail',
        method: 'POST',
        data,
        timeout: 60000,
        noNeedLoading: true
    });
};

/**
 * 数据-推广活动-推广活动明细-按推广链接
 * @param data
 * @returns
 */
export const getStaticsPromotionUrlDetail = (data: any) => {
    return request({
        url: '/scrm-api/console/retail/shop/statics-promotion-url-detail',
        method: 'POST',
        data,
        timeout: 60000,
        noNeedLoading: true
    });
};

/**
 * @param data
 * @returns
 */
export const getCommonCustomFieldList = (data: any) => {
    return request({
        url: '/scrm-api/console/common/custom-field-list',
        method: 'POST',
        data,
        timeout: 60000,
        noNeedLoading: true
    });
};
/**
 * 数据-推广活动-推广活动明细-按员工-导出
 * @param data
 * @returns
 */
export const exportPromotionAccount = (data: any) => {
    return request({
        url: '/scrm-api/console/retail/shop/statics-promotion-account-detail/export',
        method: 'POST',
        data,
        timeout: 60000,
        noNeedLoading: true
    });
};

/**
 * 数据-推广活动-推广活动明细-按商品-导出
 * @param data
 * @returns
 */
export const exportPromotionProduct = (data: any) => {
    return request({
        url: '/scrm-api/console/retail/shop/statics-promotion-product-detail/export',
        method: 'POST',
        data,
        timeout: 60000,
        noNeedLoading: true
    });
};

/**
 * 数据-推广活动-推广活动明细-按推广链接
 * @param data
 * @returns
 */
export const exportStaticsPromotionUrl = (data: any) => {
    return request({
        url: '/scrm-api/console/retail/shop/statics-promotion-url-detail/export',
        method: 'POST',
        data,
        timeout: 60000,
        noNeedLoading: true
    });
};

/**
 * 数据-推广活动-数据趋势图
 * @param data
 * @returns
 */
export const getStaticsPromotionTrendAnalysis = (data: any) => {
    return request({
        url: '/scrm-api/console/retail/shop/statics-promotion-trend-analysis',
        method: 'POST',
        data,
        timeout: 60000,
        noNeedLoading: true
    });
};

// 获取商品素材列表
export const getGoodsList = (data: any) => {
    return request({
        url: '/scrm-api/console/media/content/product/list',
        method: 'post',
        data,
        noNeedLoading: true
    });
};
